package page123;

public class PC {
    CPU cpu = new CPU();
    HardDisk HD =new HardDisk();

    public void setCPC(CPU c){
        this.cpu=c;
    }
    public void setHardDisk(HardDisk h){
        this.HD=h;
    }
    public void show(){
        System.out.println("CPU的速度是："+cpu.getSpeed());
        System.out.println("硬盘的容量是："+HD.getAmount());
    }
}

